/*
* Class: ItemComponent
* Description: Class is used to hold item elements of RSS feeds. the Class is used by 
* RssFeed Objects and is needed to place clickable RSS feed titles in the
* rssFeedDisplayListModel in RssReaderFrame. Note the overfide of the toString
* method.
* 
* Note:
* Date: March 28, 2012
* Author: Shane Swayney
*/

package rssreaderapp;

import java.io.Serializable;


/**
 * Class is used to hold item elements of RSS feeds. the Class is used by 
 * RssFeed Objects and is needed to place clickable RSS feed titles in the
 * rssFeedDisplayListModel in RssReaderFrame. Note the overfide of the toString
 * method.
 * 
 * @author Shane Swayney <shane.swayney@gmail.com>
 */
public class ItemComponent implements Serializable{
    //Variables
    private String itemTitle = "";
    private String itemURL = "";

    /**
     * Constructor
     */
    public ItemComponent() {
    }
    
    /**
     * Constructor creates new ItemComponent
     * 
     * @param itemTitle the Title of the item element in an RSS feed
     * @param itemURL the url of the item element in an RSS feed
     */
    public ItemComponent(String itemTitle, String itemURL) {
        this.itemTitle = itemTitle;
        this.itemURL = itemURL;
    }

    //Custom toString to be used by the rssFeedListModel
    @Override
    public String toString() {
        return "---" + itemTitle;
    }


    /**
     * Get the value of itemURL
     *
     * @return the value of itemURL
     */
    public String getItemURL() {
        return itemURL;
    }

    /**
     * Set the value of itemURL
     *
     * @param itemURL new value of itemURL
     */
    public void setItemURL(String itemURL) {
        this.itemURL = itemURL;
    }


    /**
     * Get the value of itemTitle
     *
     * @return the value of itemTitle
     */
    public String getItemTitle() {
        return itemTitle;
    }

    /**
     * Set the value of itemTitle
     *
     * @param itemTitle new value of itemTitle
     */
    public void setItemTitle(String itemTitle) {
        this.itemTitle = itemTitle;
    }

}
